package com.ltt.service.impl;

import com.ltt.dao.pojo.Attention;
import com.ltt.dao.vo.UserInfoVo;
import com.ltt.mapper.AttentionMapper;
import com.ltt.service.AttentionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author ‘李天泰’
 * @version 1.0
 * @description: TODO
 * @date 2023/5/4 9:41
 */
@Service
public class AttentionServiceImpl implements AttentionService {
    @Autowired
    private AttentionMapper attentionMapper;

    @Override
    public void addAttention(Attention attention) {
        attentionMapper.addAttention(attention);
    }

    @Override
    public void insertAttention(Attention attention) {
        attentionMapper.insertAttention(attention);
    }

    @Override
    public void cancelAttention(Attention attention) {
        attentionMapper.cancelAttention(attention);
    }

    @Override
    public Attention findAttention(Attention attention) {
        return attentionMapper.findAttention(attention);
    }

    @Override
    public List<UserInfoVo> findAllAttentionUser(String openid) {
        return attentionMapper.findAllAttentionUser(openid);
    }

    @Override
    public List<UserInfoVo> findAllFansUser(String openid) {
        return attentionMapper.findAllFansUser(openid);
    }

    @Override
    public Attention isAttention(Attention attention) {
        return attentionMapper.isAttention(attention);
    }
}
